package de.tum.in.elitese.wahlsys.common;

import de.tum.in.elitese.wahlsys.common.impl.DbServiceImpl;

/**
 * A factory which creates an instance of DbService. This is for decoupling the
 * users of DbService from the actual chosen implementation.
 * 
 * @author christoph
 * 
 */
public class DbServiceFactrory {
	private static final DbServiceFactrory INSTANCE = new DbServiceFactrory();

	/**
	 * Singleton getter.
	 * 
	 * @return the instance of DbServiceFactory
	 */
	public static DbServiceFactrory getInstance() {
		return INSTANCE;
	}

	private DbServiceFactrory() {
	}

	/**
	 * Creates a instance of DbService.
	 * 
	 * @return the instance of DbService
	 */
	public DbService createDbService() {
		return new DbServiceImpl();
	}
}
